// withdrawal_model.dart
import 'package:json_annotation/json_annotation.dart';
import 'package:sjx/repository/model/withdrawal_option_model.dart';

part 'withdrawal_model.g.dart';

@JsonSerializable()
class WithdrawalModel {
  final String? account;
  final String? realName;
  final List<WithdrawalOptionModel> withdrawOptions;

  WithdrawalModel({
    this.account,
    this.realName,
    required this.withdrawOptions,
  });

  factory WithdrawalModel.fromJson(Map<String, dynamic> json) =>
      _$WithdrawalModelFromJson(json);

  Map<String, dynamic> toJson() => _$WithdrawalModelToJson(this);

  bool get isBound => account?.isNotEmpty == true;
}